import request from '@/utils/request'

// 查询清单列表
export function listList(query) {
  return request({
    url: '/system/list/list',
    method: 'get',
    params: query
  })
}

// 查询清单详细
export function getList(checkListId) {
  return request({
    url: '/system/list/' + checkListId,
    method: 'get'
  })
}

// 新增清单
export function addList(data) {
  return request({
    url: '/system/list',
    method: 'post',
    data: data
  })
}

// 修改清单
export function updateList(data) {
  return request({
    url: '/system/list',
    method: 'put',
    data: data
  })
}

// 删除清单
export function delList(checkListId) {
  return request({
    url: '/system/list/' + checkListId,
    method: 'delete'
  })
}
// 撤回清单
export function withdrawList(checkListId) {
  return request({
    url: '/system/list/withdraw/' + checkListId,
    method: 'put'
  })
}

//上移 下移
export function moveUpOrDown(data) {
  return request({
    url: '/system/list/moveUpOrDown',
    method: 'put',
    data
  })
}

//置顶 置底
export function pinToTopOrEnd(data) {
  return request({
    url: '/system/list/pinToTopOrEnd',
    method: 'put',
    data
  })
}
//获取相关阅读列表
export function getRelateReadList(checkListId) {
  return request({
    url: '/system/list/getRelateReadList?checkListId=' + checkListId,
    method: 'get',
  })
}


//获取相关阅读列表
export function getRelateResourceList(checkListId) {
  return request({
    url: '/system/list/getRelateResourceList?checkListId=' + checkListId,
    method: 'get',
  })
}

//获取桥梁编号 根据bridgeType类型
export function getBridgeNumByBridgeType(bridgeType) {
  return request({
    url: '/system/list/getBridgeNum?bridgeType=' + bridgeType,
    method: 'get',
  })
}


//获取桥梁编号 根据bridgeType类型
export function getResourceByType(query) {
  return request({
    url: '/system/list/getResourceByType',
    method: 'get',
    params: query
  })
}




